// import { Select } from "antd"
import { FC } from "react"

//import { useOptions } from "@/hooks/useOptions"
import { SFormItem } from "@/components/common"
import StyleSelect from "@/components/common/styleSelect"
import { useLocale } from "@/locales"

const LoginStatus: FC<any> = props => {
	const { rules, disable, labelProps, selectorProps } = props
	const { formatMessage } = useLocale()
	const options = [
		{ label: formatMessage({ id: "member.login_info_tab.fail" }), value: 0 },
		{ label: formatMessage({ id: "member.login_info_tab.success" }), value: 1 }
	]

	return (
		<SFormItem name="loginStatus" label={`${formatMessage({ id: "label.login_status" })}:`} rules={rules} {...labelProps}>
			<StyleSelect
				placeholder={formatMessage({ id: "common.all" })}
				allowClear
				options={options}
				disable={disable}
				{...selectorProps}
			/>
		</SFormItem>
	)
}

export default LoginStatus
